refactor: narrow voice_mode to Literal["session"]#110
Draft
JoshParkSJ wants to merge 1 commit intomainfrom
Draft
refactor: narrow voice_mode to Literal["session"]#110JoshParkSJ wants to merge 1 commit intomainfrom
JoshParkSJ wants to merge 1 commit intomainfrom
Conversation
The legacy "1 job per tool call" / "1 job per agent config" voice paths have been removed in uipath-agents-python's VoiceJobRuntime. The only remaining voice mode is "session" (long-lived URT job that streams tool calls over socket.io to CAS). Narrow voice_mode accordingly so dead literals don't propagate into runtime callers.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
UiPathRuntimeContext.voice_modefromLiteral["config", "toolCall"]toLiteral["session"]and update its description.uipath-agents-python'sVoiceJobRuntime. After that change,sessionis the only mode the runtime factory ever sees on this field.voice.mode: 'session'in the started job's FPS properties;context.pystill mapsvoice.mode→voice_mode.Coordination
VoiceJobRuntimeto session-only, drops_execute_get_config/_execute_tool_call/post_to_cas, dropsvoice_modeconstructor arg.VoiceController,voice.routes.ts, thevoiceStreamAgentEnabledfeature flag, Redis pub/sub plumbing, andVoiceJobMode.Config/.ToolCall.This PR is breaking on the field's literal type but the runtime callers in
uipath-agents-pythononly checkvoice_mode is not None, so the runtime impact is limited to type-checker diagnostics for any consumer that passed the deprecated literals.Test plan
uv run ruff check src/uipath/runtime/context.pyuv run mypy src/uipath/runtime/context.pyuv run pytest tests/— 84 passed